//
//  QXStatusForwardCell.swift
//  QXWeibo
//
//  Created by QinXin on 15/7/2.
//  Copyright © 2015年 labi3285_Lab. All rights reserved.
//

import UIKit
import FFAutoLayout

class QXStatusForwardCell: QXStatusCell {
    
    lazy var forwardBtn = UIButton()
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        forwardLabel = UILabel(color: UIColor.darkGrayColor(), fontSize: 14, mutiLines: true)
        
        forwardBtn.backgroundColor = UIColor(white: 0.9, alpha: 1.0)
        forwardBtn.frame = CGRectMake(0, 0, 300, 100)
        
        insertSubview(forwardLabel!, atIndex: 0)
        insertSubview(forwardBtn, atIndex: 0)
        
        forwardLabel!.numberOfLines = 0;
        forwardLabel!.preferredMaxLayoutWidth = UIScreen.mainScreen().bounds.width - 12

        forwardBtn.ff_AlignVertical(ff_AlignType.BottomLeft, referView: contentLabel, size: nil, offset: CGPoint(x: -12, y: 12))
        forwardBtn.ff_AlignVertical(ff_AlignType.TopRight, referView: footerView, size: nil)
        
        forwardLabel!.ff_AlignInner(ff_AlignType.TopLeft, referView: forwardBtn, size: nil, offset: CGPoint(x: 12, y: 12))
        
        let picViewConses = picView.ff_AlignVertical(ff_AlignType.BottomLeft, referView: forwardLabel!, size: CGSize(width: 290, height: 200), offset: CGPoint(x: 0, y: 12))
        picViewTopCons = picView.ff_Constraint(picViewConses, attribute: NSLayoutAttribute.Top)
        picViewWidthCons = picView.ff_Constraint(picViewConses, attribute: NSLayoutAttribute.Width)
        picViewHeightCons = picView.ff_Constraint(picViewConses, attribute: NSLayoutAttribute.Height)
        
    }

    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
